package edu.hunau.cxb18.orm.pojo;

import java.time.LocalDateTime;

/**
 * @author hb
 * @create 2020-02-28 10:41
 */
public class Order {
    /** 订单编号：采用UUID */
    private String id;
    /**  总金额 */
    private double total;
    /**  订单生成的时间戳 */
    private LocalDateTime doTime;
    /**  订单的状态  */
    private String status;
     /**  一个订单会对应一个用户 */
    private User user;

    public Order() {
    }

    public Order(double total) {
        this.total = total;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public double getTotal() {
        return total;
    }

    public void setTotal(double total) {
        this.total = total;
    }

    public LocalDateTime getDoTime() {
        return doTime;
    }

    public void setDoTime(LocalDateTime doTime) {
        this.doTime = doTime;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public User getUser() {
        return user;
    }

    public void setUser(User user) {
        this.user = user;
    }

    @Override
    public String toString() {
        return "Order{" +
                "id='" + id + '\'' +
                ", total=" + total +
                ", doTime=" + doTime +
                ", status='" + status + '\'' +
                ", user=" + user +
                '}';
    }
}
